from heapq import heappop, heapify


def heap_sort(a):
    heapify(a)
    while len(a) > 0:
        print(heappop(a), end=', ')
